package cn.growthgate.fgo.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 异常日志
 * </p>
 *
 * @author GrowthGate
 * @since 2019-05-10
 */
@TableName("t_sys_exception_log")
public class ExceptionLog extends Model<ExceptionLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 操作主机
     */
    private String host;

    /**
     * 访问路径
     */
    private String uri;

    /**
     * 访问参数
     */
    private String params;

    /**
     * 异常类名称
     */
    private String name;

    /**
     * 堆栈追踪
     */
    private String stackTrace;

    /**
     * 发生时间
     */
    private Date addTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }
    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }
    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getStackTrace() {
        return stackTrace;
    }

    public void setStackTrace(String stackTrace) {
        this.stackTrace = stackTrace;
    }
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ExceptionLog{" +
        "id=" + id +
        ", userId=" + userId +
        ", host=" + host +
        ", uri=" + uri +
        ", params=" + params +
        ", name=" + name +
        ", stackTrace=" + stackTrace +
        ", addTime=" + addTime +
        "}";
    }
}
